package org.xx.sipahi.config;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.web.client.RestTemplateBuilder;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.client.RestTemplate;
import org.xx.armory.commons.ForLogging;

import static org.xx.armory.spring5.mvc.RestTemplateUtils.ignoreCertCustomizer;


@Configuration
public class RestConfig {
    @ForLogging
    private final Logger logger = LoggerFactory.getLogger(RestConfig.class);

    @Bean
    public RestTemplate restTemplate() {
        return new RestTemplateBuilder().customizers(ignoreCertCustomizer()).build();
    }
}
